Micron Document




Object-oriented programming
part 14/57 · 94.0 KB total
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Features

The OOP features provided by languages varies. Below are some common features of OOP languages.cite-ref-armstrongquarks-30-0[30]cite-ref-31[31]cite-ref-32[32]cite-ref-pierce-33-0[33] Comparing OOP with other styles, like relational programming, is difficult because there isn't a clear, agreed-upon definition of OOP.cite-ref-datepage650-34-0[34]

Encapsulation

An object encapsulates fields and methods. A field (a.k.a. attribute or property) contains information (a.k.a. state) as a variable. A method (a.k.a. function or action) defines behavior via logic code. Encapsulation is about keeping related, code together.

Information hiding

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────